﻿using NUnit.Framework;
using System.Collections.Generic;
using OpenSda.Agilcont.Common.Data.Contracts;
using OpenSda.Agilcont.Common.Data.Entities;
using System;

namespace OpenSda.Agilcont.Common.Data.NhContexts.NuTest
{
    
    [TestFixture]
    public class UserDataTest : AbstractBaseDataTests
    {
        private IUserData userData;
        //private IOrderDao orderDao;




        // These properties will be injected based on type
        public IUserData UserData
        {
            set { userData = value; }
        }


        [Test]
        public void CustomerDaListAllTests()
        {
            var u = userData.GetAll();

            Assert.IsNotNull(u);
        }


        [Test]
        public void UserDeleteTests()
        {
            User u = userData.Select("AS2");
            userData.Delete(u);
        }

        [Test]
        public void UserDaoTests()
        {

            User c = new User();

            c.Name = "UPeU-cinco";
                 c.UserLogin = "UPeU5";
                 c.CreationDate = new DateTime(1977, 01, 12);
            userData.Save(c);
        

        }

    }
}

